<include file="Public:header" />
<div class="content-box"><!-- Start Content Box -->
    <switch name="ACTION_NAME">
        <case value="edit">

            <div class="content-box-header">
                <h3>编辑用户</h3>
                <div class="clear"></div>
            </div> <!-- End .content-box-header -->
            <div class="content-box-content">
                <include file="Public:notify" />
                <form name="ajaxform" method="post" class="ajaxform" id="memberform" action="__URL__/doedit">
                    <table border="0" cellspacing="1" >
                        <tr>
                            <th>ID</th>
                            <td>{$id}<input type="hidden" name="id" value="{$id}"></td>
                        </tr>
                        <tr>
                            <th>用户名</th>
                            <td>{$username}</td>
                        </tr>
                        <tr>
                            <th>新密码</th>
                            <td><input type="password" name="newpwd" value=""  /></td>
                        </tr>
                        <tr>
                            <th>电子邮箱</th>
                            <td><input type="text" name="email" value="{$email}"  /></td>
                        </tr>
                        <tr>
                            <th>创建时间</th>
                            <td>{$createtime|date="Y-n-j H:i:s",###}</td>
                        </tr>
                        <tr>
                            <th>最后登陆时间</th>
                            <td><if condition="$lastlogintime eq ''">暂无登陆记录<else />{$lastlogintime|date="Y-n-j H:i:s",###}</if></td>
                        </tr>
                    </table>
                    <div align="center"><input type="submit" class="button" value="提交"  /></div>
                </form>
            </div>


        </case>
        <default />


        <div class="content-box-header">

            <h3>{$title}</h3>

            <ul class="content-box-tabs">
                <li><a href="#tab1" class="default-tab">列表</a></li>
                <li><a href="#tab2">添加</a></li>
            </ul>

            <div class="clear"></div>

        </div> <!-- End .content-box-header -->

        <div class="content-box-content">
            <include file="Public:notify" />
            <div class="tab-content default-tab" id="tab1">
                <form name="memberform" method="post" action="__URL__/batch">
                    <table>
                        <thead>
                            <tr>
                                <th><input class="check-all" type="checkbox" /></th>
                                <th>用户名</th>
                                <th>Email</th>
                                <th>最后登陆</th>
                                <th>操作</th>
                            </tr>
                        </thead>

                        <tbody>
                        <volist name="user" id="u">
                            <tr>
                                <td><input name="id[]" type="checkbox" id="id[]" value="{$u.id}"  /></td>
                                <td><a href="__URL__/edit/id/{$u.id}">{$u.username}</a></td>
                                <td><a href="__URL__/edit/id/{$u.id}">{$u.email}</a></td>
                                <td><if condition="$u.lastlogintime eq ''">暂无登陆记录<else />{$u.lastlogintime|date="Y-n-j H:i:s",###}</if></td>
                            <td><a href="__URL__/edit/id/{$u.id}">编辑</a> <a href="__URL__/batch/act/delete/id/{$u.id}">删除</a></td>
                            </tr>
                        </volist>

                        </tbody>


                        <tfoot>
                            <tr>
                                <td colspan="6">
                                    <div class="bulk-actions align-left">
                                        <select name="act">
                                            <option value="delete">删除</option>
                                        </select><input  class="button" type="submit" value="确定"  />

                                    </div>
                        <include file="Public:paging" />
                        <div class="clear"></div>
                        </td>
                        </tr>
                        </tfoot>

                    </table>

                </form>
            </div>

            <div class="tab-content" id="tab2">
                <form name="memberform" method="post" class="validate" action="__URL__/doadd">
                    <table border="1" cellspacing="1" >
                        <tr>
                            <th>用户名</th>
                            <td><input type="text" class="requery" name="username" value=""   /></td>
                        </tr>
                        <tr>
                            <th>密码</th>
                            <td><input type="password" name="password" value="" class="{required:true, minlength:6, messages:{required:'请填写密码', minlength:'密码最短6位'}}" /></td>
                        </tr>
                        <tr>
                            <th>电子邮箱</th>
                            <td><input type="text" name="email" value="" class="{required:true, email:true, messages:{required:'请填写您的邮箱', email:'请填写正确的邮箱'}}" /></td>
                        </tr>
                    </table>
                    <div align="center"><input type="submit" value="提交"  /></div>
                </form>

            </div> <!-- End #tab2 -->
        </div> <!-- End .content-box-content -->
    </switch>
</div> <!-- End .content-box -->
<include file="Public:footer" />
